﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooGtaCommonCommonSpriteManagerWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Gta.Common.CommonSpriteManager);
			Utils.BeginObjectRegister(type, L, translator, 0, 8, 0, 0);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init2", _m_Init2);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoadSpriteRes", _m_LoadSpriteRes);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "flyAnim", _m_flyAnim);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "FlyAnim2", _m_FlyAnim2);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "FlySoldierAni", _m_FlySoldierAni);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayEnd", _m_OnPlayEnd);
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Gta.Common.CommonSpriteManager();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gta.Common.CommonSpriteManager constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Gta.Common.CommonSpriteManager();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gta.Common.CommonSpriteManager constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Init(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.Init(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Init2(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    int _minAngle = LuaAPI.xlua_tointeger(L, 2);
                    int _maxAngle = LuaAPI.xlua_tointeger(L, 3);
                    int _minDisRatio = LuaAPI.xlua_tointeger(L, 4);
                    int _maxDisRatio = LuaAPI.xlua_tointeger(L, 5);
                    int _gridDis = LuaAPI.xlua_tointeger(L, 6);
                    
                    gen_to_be_invoked.Init2( _minAngle, _maxAngle, _minDisRatio, _maxDisRatio, _gridDis );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Clear(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.Clear(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_LoadSpriteRes(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.LoadSpriteRes(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_flyAnim(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    int _resType = LuaAPI.xlua_tointeger(L, 2);
                    int _count = LuaAPI.xlua_tointeger(L, 3);
                    UnityEngine.Vector3 _startPos;translator.Get(L, 4, out _startPos);
                    UnityEngine.Vector3 _endPos;translator.Get(L, 5, out _endPos);
                    float _time = (float)LuaAPI.lua_tonumber(L, 6);
                    UnityEngine.RectTransform _rectrans = (UnityEngine.RectTransform)translator.GetObject(L, 7, typeof(UnityEngine.RectTransform));
                    UnityEngine.Camera _uiCamera = (UnityEngine.Camera)translator.GetObject(L, 8, typeof(UnityEngine.Camera));
                    UnityEngine.Camera _cityCam = (UnityEngine.Camera)translator.GetObject(L, 9, typeof(UnityEngine.Camera));
                    
                    gen_to_be_invoked.flyAnim( _resType, _count, _startPos, _endPos, _time, _rectrans, _uiCamera, _cityCam );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_FlyAnim2(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    int _resType = LuaAPI.xlua_tointeger(L, 2);
                    int _count = LuaAPI.xlua_tointeger(L, 3);
                    UnityEngine.Vector3 _startPos;translator.Get(L, 4, out _startPos);
                    UnityEngine.Vector3 _endPos;translator.Get(L, 5, out _endPos);
                    float _time = (float)LuaAPI.lua_tonumber(L, 6);
                    float _gridRadius = (float)LuaAPI.lua_tonumber(L, 7);
                    UnityEngine.RectTransform _rt = (UnityEngine.RectTransform)translator.GetObject(L, 8, typeof(UnityEngine.RectTransform));
                    UnityEngine.Camera _uiCamera = (UnityEngine.Camera)translator.GetObject(L, 9, typeof(UnityEngine.Camera));
                    XLua.LuaFunction _onOneFlyCompleted = (XLua.LuaFunction)translator.GetObject(L, 10, typeof(XLua.LuaFunction));
                    XLua.LuaFunction _onFlyCompleted = (XLua.LuaFunction)translator.GetObject(L, 11, typeof(XLua.LuaFunction));
                    UnityEngine.Camera _cityCam = (UnityEngine.Camera)translator.GetObject(L, 12, typeof(UnityEngine.Camera));
                    
                    gen_to_be_invoked.FlyAnim2( _resType, _count, _startPos, _endPos, _time, _gridRadius, _rt, _uiCamera, _onOneFlyCompleted, _onFlyCompleted, _cityCam );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_FlySoldierAni(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
                    UnityEngine.RectTransform _powerRect = (UnityEngine.RectTransform)translator.GetObject(L, 3, typeof(UnityEngine.RectTransform));
                    UnityEngine.Vector3 _startPos;translator.Get(L, 4, out _startPos);
                    float _radius = (float)LuaAPI.lua_tonumber(L, 5);
                    UnityEngine.Camera _uiCam = (UnityEngine.Camera)translator.GetObject(L, 6, typeof(UnityEngine.Camera));
                    XLua.LuaFunction _callback = (XLua.LuaFunction)translator.GetObject(L, 7, typeof(XLua.LuaFunction));
                    bool _isUIPos = LuaAPI.lua_toboolean(L, 8);
                    UnityEngine.Camera _cityCam = (UnityEngine.Camera)translator.GetObject(L, 9, typeof(UnityEngine.Camera));
                    UnityEngine.Camera _hudCamera = (UnityEngine.Camera)translator.GetObject(L, 10, typeof(UnityEngine.Camera));
                    
                    gen_to_be_invoked.FlySoldierAni( _go, _powerRect, _startPos, _radius, _uiCam, _callback, _isUIPos, _cityCam, _hudCamera );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnPlayEnd(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gta.Common.CommonSpriteManager gen_to_be_invoked = (Yoozoo.Gta.Common.CommonSpriteManager)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    int _id = LuaAPI.xlua_tointeger(L, 2);
                    
                    gen_to_be_invoked.OnPlayEnd( _id );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        
        
		
		
		
		
    }
}
